/*
 *    仪表设置
 * Author: lengleng (wangiegie@gmail.com)
 */

import request from "@/router/axios";

export function fetchList(query) {
  return request({
    url: "/estate/rmproject/page",
    method: "get",
    params: query
  });
}

export function addObj(obj) {
  return request({
    url: "/estate/rmproject",
    method: "post",
    data: obj
  });
}

export function getObj(id) {
  return request({
    url: "/estate/rmproject/" + id,
    method: "get"
  });
}

export function delObj(id) {
  return request({
    url: "/estate/rmproject/" + id,
    method: "delete"
  });
}

export function putObj(obj) {
  return request({
    url: "/estate/rmproject",
    method: "put",
    data: obj
  });
}

// 获得设置信息
export function getMeterSettings(obj) {
  return request({
    url: "/meter/mrprivatemeter/getPrivateMeterFloorSettings",
    method: "get",
    params: obj
  });
}
// 修改设置
export function saveMeterSettings(obj) {
  return request({
    url: " /meter/mrprivatemeter/saveMrPrivateMeterInfo",
    method: "put",
    data: obj
  });
}
// 新增信息
export function mrpublicmeterrelate(method, obj) {
  return request({
    url: "/meter/mrpublicmeterrelate",
    method: method,
    data: obj
  });
}
// 清除
export function mrpublicDetele(obj) {
  return request({
    url: "/meter/mrpublicmeterrelate",
    method: "delete",
    params: obj
  });
}

// 弹窗列表
export function FloorSettings(obj) {
  return request({
    url: "/meter/mrpublicmeter/getPublicMeterFloorSettings",
    method: "get",
    params: obj
  });
}

// 弹窗新增
export function saveFloorProject(obj) {
  return request({
    url: "/meter/mrpublicmeterfloorproject",
    method: "post",
    data: obj
  });
}

// 弹窗清除
export function deleteFloorProject(obj) {
  return request({
    url: "/meter/mrpublicmeterfloorproject",
    method: "delete",
    params: obj
  });
}

// 获取房产编号
export function EstateByPublicMeter(obj) {
  return request({
    url: "/config/sysprojecttype/getEstateByPrivateMeter",
    method: "get",
    params: obj
  });
}

// 保存
export function SaveMeter(obj) {
  return request({
    url: "/meter/mrprivatemeterrelate",
    method: "post",
    data: obj
  });
}
// 删除
export function delMeter(obj) {
  return request({
    url: "/meter/mrprivatemeterrelate",
    method: "delete",
    params: obj
  });
}
